Skip to content

fix(ui): kanban, calendar, timeline and map draw the no-access state for a refused read - #36016

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36010-views-no-access-state
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36010-views-no-access-state

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #36010

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:看板、日历、时间线、地图这四种视图里,没有数据读取权限的人原来会看到一串英文服务器报错,现在看到和列表页一样的「无权访问」提示,按自己的语言显示。
  • 为什么做:这是甘特图同类修复的收尾,把同一问题在其余四种视图里一次补齐。
  • 出错会怎样:只影响被拒读这一种情况;服务器故障、断网仍显示原来的报错画面,改动可直接撤回。
  • 要你做什么:无。

What changes

The load-error branch of ObjectKanban, ObjectCalendar, ObjectTimeline and ObjectMap now classifies a failed data load with the shared classifyLoadError (@object-ui/react). A forbidden verdict (a 403, or a PERMISSION_DENIED / FORBIDDEN code) draws the shared DataEmptyState (role="status", Lock icon) with the existing list.loadErrorForbiddenTitle / list.loadErrorForbiddenMessage keys, and none of the server's text. Every other failure keeps each view's current error screen. This copies the Gantt pattern of PR #36006 view by view.

  • Shared helper or copy: copied per view. No shared "load error to no-access" component exists, and adding one to @object-ui/components would be a new public export outside the claim's file surface.
  • English fallbacks: kanban and timeline get two rows in their existing default-translation tables (KANBAN_DEFAULT_TRANSLATIONS, TIMELINE_DEFAULT_TRANSLATIONS), with the same text as the en pack. Calendar and map have no such table, so their t() calls carry defaultValue with the same text. No new i18n key.
  • Icon: kanban and calendar already depend on lucide-react and use Lock. Timeline and map declare no icon library, so they use the shared LazyIcon name="lock" from @object-ui/components (same as record-alert.tsx), and no dependency is added.
  • The map's tile-style failure (mapStyleError) is not a data load and is unchanged.
  • The ObjectKanban.tsx changes are the import lines, two fallback rows and the load-error branch only (os-sales draft PR feat(list,detail): a change that makes other fields required asks for them in place #35994 also edits that file).

Tests

New pins sit in each view's existing load-error harness as a top-level describe: ObjectKanban.errorClears-10663.test.tsx, ObjectCalendar.errorClears-10663.test.tsx, ObjectTimeline.errorClears-10663.test.tsx, plus ObjectMap.test.tsx (map has no load-error harness). In each one, a 403 with httpStatus and code draws *-no-access with role="status", the en sentence, and no Error, PERMISSION_DENIED or HTTP 403 text. CONTROL: a 500 keeps the existing error screen.

Acceptance notes

  • A2 (browser reading) was not done. Setting up a showcase object with a kanban or calendar view and a refused read is not cheap here. The unit pins drive the real component through a data source that throws the adapter's 403 shape.
  • useTimelineTranslation comments say the table is the "byte-identical twin of en.ts". The two new rows match en.ts list.loadErrorForbidden* text exactly.

Verification

Two-minute check: cd ui && pnpm exec vitest run packages/plugin-kanban/src/ObjectKanban.errorClears-10663.test.tsx -t 'refused read'. You should see 2 passed.

Green on head 37a0692: 4 files, 24 tests
cd ui && pnpm exec vitest run --maxWorkers=2 packages/plugin-kanban/src/ObjectKanban.errorClears-10663.test.tsx packages/plugin-calendar/src/ObjectCalendar.errorClears-10663.test.tsx packages/plugin-timeline/src/ObjectTimeline.errorClears-10663.test.tsx packages/plugin-map/src/ObjectMap.test.tsx
 Test Files  4 passed (4)
      Tests  24 passed (24)
os-verify-lock: VERDICT command-exit 0
Red on base (sources reverted to ec24363, tests kept): every 403 pin red, every CONTROL green
 x object-timeline: a refused read draws the no-access state > a 403 read draws the no-access state, with none of the server text
 v object-timeline: ... > CONTROL: a 500 keeps the existing error screen
 x object-calendar: ... > a 403 read ...
 v object-calendar: ... > CONTROL: a 500 ...
 x ObjectMap: ... > a 403 read ...
 v ObjectMap: ... > CONTROL: a 500 ...
 x object-kanban: ... > a 403 read ...
 v object-kanban: ... > CONTROL: a 500 ...
 Tests  4 failed | 20 passed (24)
restore: git diff HEAD empty; every restored blob equals its HEAD blob
Ablation (kanban, one view): forbidden branch disabled, the 403 pin goes red
node scripts/ablation-replace.mjs --file ui/packages/plugin-kanban/src/ObjectKanban.tsx --anchor "if (error && classifyLoadError(error) === 'forbidden') {" --replacement "if (error && false) {" -- ... vitest run ... -t 'refused read'
ablation-replace: ok mutation landed: anchor 1 -> 0, blob 8bd927f5cdf5 -> 0f5997510cd0
      Tests  1 failed | 1 passed | 4 skipped (6)
ablation-replace: ok restored: blob == HEAD (8bd927f5cdf5) and `git diff HEAD` is empty

The test imports the component from src (relative ./index / ./ObjectMap), so no dist build is needed for the mutation to take effect.

Type check: the four plugins
pnpm --filter @object-ui/plugin-{kanban,calendar,timeline,map} run type-check   (tsc --noEmit && tsc -p tsconfig.test.json)
packages/plugin-calendar type-check: Done
packages/plugin-kanban type-check: Done
packages/plugin-map type-check: Done
packages/plugin-timeline type-check: Done
VERDICT command-exit 0
Derived gate families (local subset)
head 37a06922; dispatch-gates --commands derived 38 families; all run, each exit 0:
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
dispatch-gates --ran: 38 derived, 38 run, 0 NOT-MEASURED (a DERIVED zero: all 38 recorded an exit code)
check:query-options-erasure and check:type-check-debt hit the 300s timeout of the first loop (exit 124); rerun with no timeout: both exit 0

Files to read first: ui/packages/plugin-map/src/ObjectMap.tsx (the new branch sits before the data error screen and must not catch mapStyleError), ui/packages/plugin-timeline/src/ObjectTimeline.tsx (LazyIcon instead of lucide-react), ui/packages/plugin-kanban/src/ObjectKanban.tsx (it overlaps PR #35994).


Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 接着甘特图的修复,看板、日历、时间线、地图四种视图也一样:用户没有权限读取其中的记录时,不再显示服务器原始英文报错,而是显示统一的「你没有访问权限」提示,跟随用户语言。
  • 服务器出错、网络断开等其他失败仍显示各视图原来的错误画面;地图底图加载失败不受影响。
  • 席位意见:通过;由区域自行合并。

席位核对

ACCEPT · head 37a0692251 · card #36010 (under #35317; claim 7058595180) · K=8 · merge-tree vs origin/main clean · governed: none · size +368/−4, 10 files, all within the claim surface · Clause-② no, no packages/spec path → area lands · CI 39 success, 13 skipped · 2026-11-21T07:34Z

  • The fix(plugin-gantt): a refused task read draws the no-access state, not the raw error #36006 pattern is repeated in four places. In each, a classifyLoadError(error) === 'forbidden' branch sits directly before the view's existing if (error) screen, so it adds no hook and changes no hook order. It draws DataEmptyState (role="status") with the shared list.loadErrorForbidden* keys and no server text. A 500 or a dropped connection keeps each view's current screen. Map's mapStyleError is not routed through this branch.
  • Fallback text:
    • Kanban and Timeline get rows in their default-translation tables.
    • Calendar (useObjectTranslation) and Map pass defaultValue.
    • All four match the en pack exactly.
  • Icon:
    • Kanban and Calendar already declare lucide-react and use Lock.
    • Timeline and Map declare no icon library, so they use the shared LazyIcon name="lock". No new dependency is added.
  • Copying the branch into each view instead of adding a shared helper keeps the public export surface unchanged. That fits the claim's limits for four fourteen-line branches.
  • Pins: each view's 403 pin is red on base ec243639 and green on the head (4/4), and each 500 CONTROL is green on both. The Kanban ablation turns 1 red. Type-check passes for the four plugins. A4 was not measured, and the body says so.
  • Overlap: os-sales draft feat(list,detail): a change that makes other fields required asks for them in place #35994 overlaps only on ObjectKanban's imports and the two fallback rows. Whichever lands second merges main.

No required item at L1. Flip ready and land.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

Landing · area ux-2 · 2026-11-21T07:35Z

reading value
L1-a ACCEPT comment 7059353668 at 37a0692251 (= current head); no required item
Seat no L2 owed (no packages/spec path, Clause-② no)
CI green at 37a0692251 (39 success, 13 skipped, 0 failed); K = 8 (< 15); merge-tree vs origin/main clean
check-governed-merges --pr 36016 NOT governed; +368 / −4 ≤ 3000
overlap os-sales draft #35994 (ObjectKanban imports and two fallback rows); whichever lands second merges main

State: draft → ready + auto-merge (merge queue). Fixes #36010.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 07:35
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit be91bfc Nov 21, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36010-views-no-access-state branch November 21, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kanban, Calendar, Timeline and Map show a refused read's raw error instead of the no-access state

2 participants